package com.hsteach.enums;

import com.hsteach.dao.domain.wage.WageTemplateItems;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

@Getter
@AllArgsConstructor
public enum WageDefaultTemp2Enum {

    ITEM1(1L, "姓名", "xm",WageItemTypeEnum.OTHER,0,1),
    ITEM2(2L, "身份证号", "sfzh",WageItemTypeEnum.OTHER,0,1),
    ITEM3(3L, "岗位工资", "gwgz",WageItemTypeEnum.ACCRUED,0,1),
    ITEM4(4L, "薪级工资", "xjgz",WageItemTypeEnum.ACCRUED,0,1),
    ITEM5(5L, "基础绩效岗位津贴", "jcjxgwjt",WageItemTypeEnum.ACCRUED,0,1),
    ITEM6(6L, "农村教师补贴", "ncjsbt",WageItemTypeEnum.ACCRUED,0,1),
    ITEM7(7L, "奖励性绩效津贴", "jlxjxjt",WageItemTypeEnum.ACCRUED,0,1),
    ITEM8(8L, "班主任津贴", "bzrjt",WageItemTypeEnum.ACCRUED,0,1),
    ITEM9(9L, "校长津贴", "xzjt",WageItemTypeEnum.ACCRUED,0,1),
    ITEM10(10L, "教龄津贴", "jljt",WageItemTypeEnum.ACCRUED,0,1),
    ITEM11(11L, "116津贴", "116jt",WageItemTypeEnum.ACCRUED,0,1),
    ITEM12(12L, "独子费", "dzf",WageItemTypeEnum.ACCRUED,0,1),
    ITEM13(13L, "补发工资", "bfgz",WageItemTypeEnum.ACCRUED,0,1),
    ITEM14(14L, "其他", "qt",WageItemTypeEnum.ACCRUED,0,1),
    ITEM15(15L, "所得税", "sds",WageItemTypeEnum.DEDUCTION,0,1),
    ITEM16(16L, "工会会费", "ghhf",WageItemTypeEnum.DEDUCTION,0,1),
    ITEM17(17L, "住房公积金", "zfgjj",WageItemTypeEnum.DEDUCTION,0,1),
    ITEM18(18L, "失业保险", "sybx",WageItemTypeEnum.DEDUCTION,0,1),
    ITEM19(19L, "医疗保险", "ylbx1",WageItemTypeEnum.DEDUCTION,0,1),
    ITEM20(20L, "养老保险", "ylbx2",WageItemTypeEnum.DEDUCTION,0,1),
    ITEM21(21L, "个人职业年金", "grzynj",WageItemTypeEnum.DEDUCTION,0,1),
    ITEM22(22L, "其他扣项", "qtkx",WageItemTypeEnum.DEDUCTION,0,1),
    ITEM23(22L, "备注", "bz",WageItemTypeEnum.OTHER,0,1),
    ;

    private Long orderId;
    private String itemName;
    private String itemCode;
    private WageItemTypeEnum itemType;
    private Integer itemSource;
    private Integer status;

    public static List<WageTemplateItems> getDefaultItems(Long templateId) {
        return Arrays.stream(WageDefaultTemp2Enum.values()).map(e -> {
            WageTemplateItems item = new WageTemplateItems();
            item.setTemplateId(templateId);
            item.setItemCode(e.getItemCode());
            item.setOrderId(e.getOrderId());
            item.setItemName(e.getItemName());
            item.setItemType(e.getItemType().getCode());
            item.setItemSource(e.getItemSource());
            item.setStatus(e.getStatus());
            return item;
        }).collect(Collectors.toList());
    }
}
